package com.maserb.monitor.service.base.impl;

import com.maserb.monitor.service.base.PagingAndSortingService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.repository.NoRepositoryBean;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.io.Serializable;

@NoRepositoryBean
public class PagingAndSortingServiceImpl<Rep extends PagingAndSortingRepository<T, ID>, T, ID extends Serializable>
        extends CrudServiceImpl<Rep, T, ID>
        implements PagingAndSortingService<Rep, T, ID> {

    @Override
    public Iterable<T> findAll(Sort var1) {
        return repository.findAll(var1);
    }

    @Override
    public Page<T> findAll(Pageable var1) {
        return repository.findAll(var1);
    }
}